summaryrefslogtreecommitdiff
path: root/www/src/pages/blog/[slug].astro
diff options
context:
space:
mode:
Diffstat (limited to 'www/src/pages/blog/[slug].astro')
-rw-r--r--www/src/pages/blog/[slug].astro15
1 files changed, 7 insertions, 8 deletions
diff --git a/www/src/pages/blog/[slug].astro b/www/src/pages/blog/[slug].astro
index 2b5d62c1f..fb1af91ab 100644
--- a/www/src/pages/blog/[slug].astro
+++ b/www/src/pages/blog/[slug].astro
@@ -1,5 +1,4 @@
---
-import { Markdown, Code, Debug } from 'astro/components';
import BaseHead from '../../components/BaseHead.astro';
import BlogHeader from '../../components/BlogHeader.astro';
import BlogPost from '../../components/BlogPost.astro';
@@ -7,16 +6,16 @@ import GoogleAnalytics from '../../components/GoogleAnalytics.astro';
export function getStaticPaths() {
const posts = Astro.fetchContent('../../data/blog-posts/*.md');
- return (posts.map(p => ({
- params: {slug: p.file.pathname.split('/').pop().split('.').shift()},
- props: {post: p},
- })));
+ return posts.map(p => ({
+ params: { slug: p.file.pathname.split('/').pop().split('.').shift() },
+ props: { post: p },
+ }));
}
-const {title, author, description, publishDate, heroImage, heroImageAlt, permalink, lang, content} = Astro.props.post;
+const { Content, title, author, description, publishDate, heroImage, heroImageAlt, permalink, lang } = Astro.props.post;
---
-<html lang={ lang ?? 'en' }>
+<html lang={lang ?? 'en'}>
<head>
<BaseHead title={title} description={description} canonicalURL={permalink} image="https://astro.build/assets/blog/astro-021-preview/social.png" />
<link rel="stylesheet" href={Astro.resolve('../../scss/blog.scss')} />
@@ -24,7 +23,7 @@ const {title, author, description, publishDate, heroImage, heroImageAlt, permali
<body>
<BlogHeader />
<BlogPost title={title} author={author} publishDate={publishDate} heroImage={heroImage} heroImageAlt={heroImageAlt}>
- {content.html}
+ <Content />
</BlogPost>
<GoogleAnalytics />
</body>